using MicroMsg.UI.Page;
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Controls;
namespace MicroMsg.UI.UserContrl
{
	public class panelTitleControl : UserControl
	{
		public static DependencyProperty strTitleProperty = DependencyProperty.Register("strTitle", typeof(string), typeof(panelTitleControl), new PropertyMetadata(null, new PropertyChangedCallback(panelTitleControl.strTitlePropertyChanged)));
		private MMThemeTypes mPageTheme;
		internal Grid LayoutRoot;
		internal StackPanel panelTitle;
		internal Image imgMMLogo;
		internal TextBlock txtLogoTitle;
		private bool _contentLoaded;
		public string strTitle
		{
			get
			{
				return (string)base.GetValue(panelTitleControl.strTitleProperty);
			}
			set
			{
				base.SetValue(panelTitleControl.strTitleProperty, value);
			}
		}
		private static void strTitlePropertyChanged(DependencyObject dependencyObject_0, DependencyPropertyChangedEventArgs dependencyPropertyChangedEventArgs_0)
		{
			if (dependencyPropertyChangedEventArgs_0.get_Property() == panelTitleControl.strTitleProperty)
			{
				panelTitleControl panelTitleControl = dependencyObject_0 as panelTitleControl;
				panelTitleControl.txtLogoTitle.set_Text(panelTitleControl.strTitle.ToUpper());
			}
		}
		public panelTitleControl()
		{
			this.InitializeComponent();
			this.txtLogoTitle.set_Foreground(R.theme.COMMON_1STTITLE_NORMAL_WORD__BRUSH);
			base.add_Loaded(new RoutedEventHandler(this.panelTitleControl_Loaded));
			this.mPageTheme = MMTheme.getThemeType();
		}
		private void panelTitleControl_Loaded(object sender, RoutedEventArgs e)
		{
			if (this.mPageTheme != MMTheme.getThemeType())
			{
				this.txtLogoTitle.set_Foreground(R.theme.COMMON_1STTITLE_NORMAL_WORD__BRUSH);
				this.mPageTheme = MMTheme.getThemeType();
			}
		}
		[DebuggerNonUserCode]
		public void InitializeComponent()
		{
			if (this._contentLoaded)
			{
				return;
			}
			this._contentLoaded = true;
			Application.LoadComponent(this, new Uri("/MicroMsg;component/Source/UI/CommonUseControl/panelTitleControl.xaml", 2));
			this.LayoutRoot = (Grid)base.FindName("LayoutRoot");
			this.panelTitle = (StackPanel)base.FindName("panelTitle");
			this.imgMMLogo = (Image)base.FindName("imgMMLogo");
			this.txtLogoTitle = (TextBlock)base.FindName("txtLogoTitle");
		}
	}
}
